<?php /* Smarty version 2.6.26, created on 2013-05-17 19:47:56
         compiled from tpattern_index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'tpattern_index.html', 319, false),array('function', 'html_radios', 'tpattern_index.html', 328, false),array('function', 'cycle', 'tpattern_index.html', 432, false),array('modifier', 'escape', 'tpattern_index.html', 338, false),)), $this); ?>
<?php echo '<?xml'; ?>
 version="1.0" encoding="utf-8"<?php echo '?>'; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>
		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/ui-lightness/ui.all.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/ui-lightness/jquery-ui-1.7.3.custom.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/dialog.css" type="text/css" />
		<style type="text/css">
			input.btnleft{	text-align:	left;};
			.disp{border:0px;border-style:none;background-color:#99CCFF;}
			table.formTable tr {height:38px;}
			td  {height:30px;}
			.errmsg{color:red;width:100%;};
			.all_div {
			  width:100%;
			  float: left;  /* 左方向にフロート */
			  position:relative;
			}
			/* 左カラム固定・右カラム可変 */
			.l_div {
			  width:49.5%;
			  float: left;  /* 左方向にフロート */
			}
			.r_div {
			 /*float: right;  右方向にフロート*/ 
			  width:50%;
			  z-index:300;
			  overflow-x:auto;
			  overflow-y:hidden;
			}
 		</style>
		<script src="assets/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script src="assets/scripts/jquery-ui-1.7.3.custom.min.js" type="text/javascript"></script>
		<script src="assets/scripts/ui/ui.dialog.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>
		<script type="text/javascript" src="./tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
		<script type="text/javascript" src="./assets/scripts/editor.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.datepicker.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		<script type="text/javascript" src="./assets/scripts/searchpara.js"></script>
		<script type="text/javascript">
		$(function() {
			$('.message').fadeIn("slow");
			$('.text_date').datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: 'yy/mm/dd'
			});
			$('#btn-save').click(function(){	
				if( confirm('更新してよろしいですか？') ){
					document.fr.submit();
				}
			});
			$('#btn-reset').click(function(){	
				location.href = document.fm.action;
			});
			
			$('#btn_search').click(function(){	
				if (chkMustInput()) {
					document.fm.csv.value="";
					document.fm.submit();
				}
			});
			
			$('.btn_search').click(function(){
				var theValue = "";
				var urlPara = makeSearchURL( this.id, theValue );
				if (urlPara){
					$("#dialog").load( urlPara ).dialog({
						modal:true
						}); 
					$('#dialog').dialog('open');
				}
			});
			
			$('#year4').change(function(){
				var year4 = this.value;
				var myDate = new Date();
				var nowtime =  myDate.getTime();
				$.get("mmap_week_ajax.php",{ y: year4,t : nowtime }, function(data){
					$("#matrix_cd").children().remove();
					$("#matrix_cd").append( data ); 
				});
			});
			
			$('#zone_cd').change(function(){
				refreshArea(this.value);

			});	
			$('#block_cd').change(function(){
				var block = this.value;
				var myDate = new Date();
				var nowtime =  myDate.getTime();
				
				$.get("ajax_zone_user.php",{ b: block,t : nowtime }, function(data){
					$("#zone_cd").children().remove();
					$("#zone_cd").append( data ); 
					var zonecd = $("#zone_cd").val() ;
					if(zonecd){
						if (zonecd.length>0){
							refreshArea(zonecd);
						} else {
							$("#area_cd").children().remove();
						}
					}else {
						$("#area_cd").children().remove();
					}
				});
			});	
			
			$('#btn_set').click(function(){	
				var  media_name =  ($('#fmset [name^=media_name]').val());
				var  precent    = ($('#fmset [name^=percent]').val());
				if (media_name == "") {
					alert("媒体名を入力してください！");
					$('#fmset [name^=media_name]').focus();
					return ;
				}
				var   reg=/^\d+$/g;  
				if(reg.test(precent)==false)
				{
					alert("パーセントに数字を入力してください！");
					$('#fmset [name^=percent]').focus();
					return ;
				}
				var names = document.getElementsByName('media_name[]');
				$.each(names, function(i,val){
					if (media_name == val.value) {
						$('#pp_' + i ).attr("value", precent);
						var text =   Math.round(   $('#inum_' + i ).attr("value")   * precent * 1 /100 ) ;
						 $('#pn_' + i ).attr("value", text);
						reSetChks(i, text);
				 	}
				}); 
			});
			$(".cp").click(function() { 
				var isChecked = $(this).attr("checked");
				var idstr = $(this).attr("id");
				var valid = $(this).val();
				var index =  idstr.split("_")[1] ;
				if (isChecked) {
					var text =  $('#pn_' + index ).attr("value");
					$('#p' + valid + '_' + index ).attr("value", text);
				} else {
					$('#p' + valid + '_' + index ).attr("value", "");
				}
			});
			
			$(".per").live('change',function(){
				var thePer =  $(this).val();
				var index =  $('#fr [name^=pper]').index($(this));
				var text =   Math.round( $('#inum_' +index ).attr("value") * thePer * 1 /100 ) ;
				$('#pn_' + index ).attr("value", text);
				reSetChks(index, text);
			});
			
			$(".nums").live('change',function(){
				var theNum =  $(this).val();
				var index =  $('#fr [name^=pnums]').index($(this));
				reSetChks(index, theNum);
			});
			
			$(".bs").click(function() {
				var theid = $(this).attr("id") ;
				var idarr =  theid.split("_") ;
				
				openwinX(idarr[1]);
			});
			
			$('.sort').change(function(){
				if (this.value == 2) {
					$('#tr_op3')['hide']();
					$('#tr_op2')['show']();
				}else if (this.value == 3) {
					$('#tr_op2')['hide']();
					$('#tr_op3')['show']();
				}else {
					$('#tr_op2')['hide']();
					$('#tr_op3')['hide']();
				}
			});
			
		});
		function refreshArea( zone ){
			var myDate = new Date();
			var nowtime =  myDate.getTime();
			$.get("ajax_area_user.php",{ zo: zone,t : nowtime }, function(data){
				$("#area_cd").children().remove();
				$("#area_cd").append( data ); 
			});
		}
		function reSetChks(index, ntext) {
 <?php $_from = $this->_tpl_vars['pattern']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['pattername'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['pattername']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kh'] => $this->_tpl_vars['vh']):
        $this->_foreach['pattername']['iteration']++;
?>
		if  ( $('#c<?php echo $this->_tpl_vars['vh']['pattern_cd']; ?>
_' + index).is(':checked')) {$('#p<?php echo $this->_tpl_vars['vh']['pattern_cd']; ?>
_' + index).attr("value", ntext);}
 <?php endforeach; endif; unset($_from); ?>
		}
		function openwinX(inid){
			var strUrl = "tpattern_info.php?pre=<?php echo $this->_tpl_vars['pre_matrix']; ?>
&id=" + inid;
			var myWindow =window.open (strUrl, 'pinf', 'menubar=no,location=no, status=no,toolbar=no,scrollbars=no,resizable=yes,left=0px,top=0px,height=768px, width=280px');
			myWindow.focus();
		}
		function toPage(thepage) {
			document.fm.page.value =  thepage;
			document.fm.csv.value="";
			document.fm.submit();
		}
		function setSS( valcd, valnm ) {
			if (gPara == "shop") {
				document.fm.shop_cd.value = valcd;
				document.fm.shop_name.value = valnm;			
			}
			if (gPara == "mediaid") {
				document.fmset.media_cd.value = valcd;
				document.fmset.media_name.value = valnm;			
			} 
			if (gPara == "smediaid") {
				document.fm.smedia_cd.value = valcd;
				document.fm.smedia_name.value = valnm;			
			} 
			$('#dialog').dialog("close");
		}
		function heightResize (){
			var l_th_height = $('.l_div th').height();
			$('.r_div th').css('height',l_th_height+'px');
		}
		$(window).resize(heightResize);
		
		function chkWeek() {
			var weekid = $("#matrix_cd").val() ;
			if (weekid.length == 0){
				alert("週を選択してください");
				return false;
			 }
			return true;
		}
		
		function chkMustInput() {
			var weekid = $("#matrix_cd").val() ;
			if (weekid.length == 0){
				alert("週を選択してください");
				return false;
			 }

			var blockcd = $("#block_cd").val() ;
			if (blockcd.length == 0){
				alert("ブロックを選択してください");
				return false;
			 }
			return true;
		}
		
		function makeSearchURL(inval, innameval) {
			//inval -> media,delive, shop 
			var sphp = "mserach_simple.php";
			
			var para = inval.split("_");
			gPara = inval;
			var tpara = inval;
			//alert(para[0]);
			var blockcd = $("#block_cd").val() ;
			if (blockcd.length == 0){
				alert("ブロックを選択してください");
				return false;
			 }
			var zonecd = $("#zone_cd").val() ;
			
			var areacd = $("#area_cd").val() ;
			if  (tpara  == "shop") {
				sphp = "mserach_shop.php";
			}
			
			/*
			if (inval.substr(0,5)  == "lnews") {
				tpara = "mediaid";
			} 
			 */
			
			var urlPara = sphp + "?t=" + tpara ;
			urlPara = urlPara + "&v=" + encodeURI(innameval);
			urlPara = urlPara + "&b=" + blockcd;
			urlPara = urlPara + "&z=" + zonecd;
			urlPara = urlPara + "&a=" + areacd;
			
			var myDate = new Date();
			urlPara = urlPara + "&s=" + myDate.getTime(); 
			return urlPara;
		}
		
		</script>
		<link rel="stylesheet" type="text/css" href="./assets/styles/tablesorter.css" />
		<script type="text/javascript" src="./assets/scripts/tablesorter.js"></script>
	</head>
	<body id="">
<?php echo $this->_tpl_vars['menu']; ?>

<?php echo $this->_tpl_vars['logout']; ?>

		<div id="container"><div class="wrapper">
			<h2>パターン管理</h2>
			<ul class="submenu clearfix">
				<li>店別配布明細検索．更新</li>
				<li><a href="tpattern_copy.php">店別配布明細登録</a></li>
				<li><a href="tpattern_export.php">店別配布明細出力</a></li>
				<li><a href="tpattern_shop.php">店別パターン部数ＤＬ</a></li>
				<?php if (! ( $this->_tpl_vars['isG2_3'] )): ?> <li><a href="tpattern_delive.php">分納明細出力</a></li> <?php endif; ?>
			</ul>
			<h3>店別配布明細</h3>
			<form name="fm" id="fm" method="get" action="tpattern_index.php" >
				<input type="hidden" name="page" />
				<table class="formTable">
					<tbody>
					<tr><th>※年度.週</th><td>
<?php echo smarty_function_html_options(array('id' => 'year4','name' => 'year4','options' => $this->_tpl_vars['year4'],'selected' => $this->_tpl_vars['forms']['year4']), $this);?>
 年<?php echo $this->_tpl_vars['err']['year4']; ?>
&nbsp;&nbsp;&nbsp;
<?php echo smarty_function_html_options(array('id' => 'matrix_cd','name' => 'matrix_cd','options' => $this->_tpl_vars['week'],'selected' => $this->_tpl_vars['forms']['matrix_cd']), $this);?>

					</td></tr><tr>
							<th>※ブロック</th>
							<td>
<?php echo smarty_function_html_options(array('id' => 'block_cd','name' => 'block_cd','options' => $this->_tpl_vars['block'],'selected' => $this->_tpl_vars['forms']['block_cd']), $this);?>

							</td>
						</tr><tr>
<th>※AJA名</th>
<td><!--  <?php echo smarty_function_html_radios(array('name' => 'sort','class' => 'sort','options' => $this->_tpl_vars['sorts'],'selected' => $this->_tpl_vars['forms']['sort'],'separator' => '&nbsp;'), $this);?>
&nbsp;
<span id="tr_op2"  style="display:<?php if (( $this->_tpl_vars['forms']['sort'] == 2 )): ?>block<?php else: ?>none<?php endif; ?>;">
<?php echo smarty_function_html_options(array('id' => 'area_cd','name' => 'area_cd','options' => $this->_tpl_vars['areauser'],'selected' => $this->_tpl_vars['forms']['area_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['area_cd']; ?>
</span> 
<span id="tr_op3"  style="display:<?php if (( $this->_tpl_vars['forms']['sort'] == 3 )): ?>block<?php else: ?>none<?php endif; ?>;">
<?php echo smarty_function_html_options(array('id' => 'zone_cd','name' => 'zone_cd','options' => $this->_tpl_vars['zoneuser'],'selected' => $this->_tpl_vars['forms']['zone_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['zone_cd']; ?>
</span>-->
ゾーン <?php echo smarty_function_html_options(array('id' => 'zone_cd','name' => 'zone_cd','options' => $this->_tpl_vars['zoneuser'],'selected' => $this->_tpl_vars['forms']['zone_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['zone_cd']; ?>
  
&nbsp;&nbsp;&nbsp;&nbsp;エリア <?php echo smarty_function_html_options(array('id' => 'area_cd','name' => 'area_cd','options' => $this->_tpl_vars['areauser'],'selected' => $this->_tpl_vars['forms']['area_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['area_cd']; ?>

 </td></tr><tr><th>店舗</th>
							<td>
								<input type="text" name="shop_name" value="<?php echo $this->_tpl_vars['forms']['shop_name']; ?>
" class="text" readonly/>
								<input type="hidden" name="shop_cd"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['shop_cd'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<button type="button" id="shop" class="btn_search" rel="shop"><span>参照</span></button>
								<button type="button" id="shop_c" class = "btn_clear" rel="shop"><span>クリア</span></button>
							</td>
						</tr>
						<tr>
							<th>媒体</th>
							<td>
								<input type="text" name="smedia_name" class="text" value="<?php echo $this->_tpl_vars['forms']['smedia_name']; ?>
" readonly />
								<input type="hidden" name="smedia_cd"  value="<?php echo $this->_tpl_vars['forms']['smedia_cd']; ?>
"  />
								<button type="button" id="smediaid" class="btn_search" rel="smedia"><span>参照</span></button>
								<button type="button" id="smedia_c" class = "btn_clear" rel="smedia"><span>クリア</span></button>
							</td>
						</tr>
						<tr>
							<th>更新日</th>
							<td>
								<input type="text" name="upd_f" class="text_date" value="<?php echo $this->_tpl_vars['forms']['upd_f']; ?>
" /> ～ 
								<input type="text" name="upd_t" class="text_date" value="<?php echo $this->_tpl_vars['forms']['upd_t']; ?>
" />
							</td>
						</tr>
					</tbody>
				</table>
				<p class="button" style="text-align:right">
					<button type="button" id="btn-reset"><span>クリア</span></button>
					<button type="button" id="btn_search" class="submit"><span>絞込検索</span></button>
				</p>
				<input type="hidden" name="search" value="1" />
				<input type="hidden" name="csv" />
			</form>
			<form name="fmset" id="fmset" method="get" action="tpattern_index.php" >
				<input type="hidden" name="page" />
				<table class="formTable">
					<tbody>
						<tr>
							<th>媒体</th>
							<td>
								<input type="text" name="media_name" class="text" />
								<input type="hidden" name="media_cd" />
								<button type="button" id="mediaid" class="btn_search" rel="media"><span>参照</span></button>
							</td>
						</tr>
						<tr>
							<th>パーセント</th>
							<td>
								<input type="text" name="percent"  class="text" />
							</td>
						</tr>

					</tbody>
				</table>
				<p class="button" style="text-align:right">
					<button type="button" id="btn_set" class="submit"><span>仮設定</span></button>
				</p>
				<input type="hidden" name="search" value="1" />
				<input type="hidden" name="csv" />
			</form>	
<form name="fr" id="fr"  action="tpattern_index_save.php" method="post">
	<?php if (is_numeric ( $this->_tpl_vars['page']['cnt'] )): ?>
	<?php if ($this->_tpl_vars['page']['cnt'] > 0): ?>
	<?php if ($this->_tpl_vars['msg']): ?>
				<p class="message"><?php echo $this->_tpl_vars['msg']; ?>
</p>
				<?php if (( $this->_tpl_vars['errmsg'] )): ?>
				<p class="error"><?php echo $this->_tpl_vars['errmsg']; ?>
</p>
				<?php endif; ?>
	<?php else: ?>
				<p class="message"><?php echo $this->_tpl_vars['page']['cnt']; ?>
件の情報が見つかりました。</p>
	<?php endif; ?>
 <div class="l_div"> 
			<table id="search_result" class="sortable" style="table-layout:fixed;word-wrap:break-word;word-break;break-all;">
				<thead>
					<tr>
					<th style="width:38px"><h3>データ<br>参照</h3></th>
						<th style="width:50px"><h3>都道府県</h3></th>
						<th style="width:80px"><h3>媒体</h3></th>
						<th style="width:110px"><h3>納品先</h3></th>
						<th style="width:85px"><h3>販売店<br/>コード</h3></th>
						<th style="width:120px"><h3>販売店エリア</h3></th>
						<th style="width:40px"><h3>部数(％)</h3></th>
						<th style="width:60px"><h3>調整部数</h3></th>
					<!--  
					<th><h3>データ<br>参照</h3></th>
						<th><h3>都道府県</h3></th>
						<th><h3>媒体</h3></th>
						<th><h3>納品先</h3></th>
						<th><h3>販売店<br/>コード</h3></th>
						<th><h3>販売店エリア</h3></th>
						<th><h3>部数(％)</h3></th>
						<th><h3>調整部数</h3></th>
						-->
					</tr>
				</thead>
				<tbody>
<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['member']['iteration']++;
?>
<tr class="<?php echo smarty_function_cycle(array('values' => "odd,mod",'name' => 'member'), $this);?>
">
	<td><button id="<?php echo $this->_tpl_vars['v']['ins_shop_shop_cd']; ?>
" type="button" class="bs" >参照</button></td>
	<td> <input name="local_name[]"  type="text"  class="dtext" value="<?php echo $this->_tpl_vars['v']['local_name']; ?>
" readonly/><input name="ins_shop_shop_cd[]"  type="hidden"   class="text" value="<?php echo $this->_tpl_vars['v']['ins_shop_shop_cd']; ?>
"/></td>
	<td><input name="media_name[]"  type="text"   class="dtext" value="<?php echo $this->_tpl_vars['v']['media_name']; ?>
" readonly/></td>
	<td><input name="delive_name[]"  type="text"  class="dtext" value="<?php echo $this->_tpl_vars['v']['delive_name']; ?>
" readonly/></td>
	<td><input name="ins_shop_cd[]"  type="text"  class="dtext" value="<?php echo $this->_tpl_vars['v']['ins_shop_cd']; ?>
" readonly/><input  id="inum_<?php echo $this->_tpl_vars['k']; ?>
" name="insert_conums[]"  type="hidden"   class="text" value="<?php echo $this->_tpl_vars['v']['insert_conums']; ?>
"/></td>
	<td><input name="ins_shop_name[]" type="text"  class="dtext" value="<?php echo $this->_tpl_vars['v']['ins_shop_name']; ?>
" readonly/></td>
	<td><input id="pp_<?php echo $this->_tpl_vars['k']; ?>
" name="pper[]"  type="text"  class="tdtext per" style="width:98%" value="<?php echo $this->_tpl_vars['v']['pper']; ?>
" /></td>
	<td><input id="pn_<?php echo $this->_tpl_vars['k']; ?>
"name="pnums[]" type="text"  class="tdtext nums" style="width:98%" value="<?php echo $this->_tpl_vars['v']['pnums']; ?>
" /></td>
</tr>
<?php endforeach; endif; unset($_from); ?>
				</tbody>
			</table>
 </div>
  <div class="r_div" style="table-layout:fixed;word-wrap:break-word;word-break;break-all;"> 
			<table id="search_result" class="sortable" style="table-layout:fixed;word-wrap:break-word;word-break;break-all;">
				<thead>
					<tr>
						<th style="width:40px"><h3>店舗<br/>コード</h3></th>
						<th style="width:120px"><h3>店名</h3></th>
						<?php $_from = $this->_tpl_vars['pattern']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['pattername'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['pattername']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kh'] => $this->_tpl_vars['vh']):
        $this->_foreach['pattername']['iteration']++;
?>
							<th  style="width:98px"><h3><?php echo $this->_tpl_vars['vh']['pattern_name']; ?>
</h3></th>
						<?php endforeach; endif; unset($_from); ?>
					</tr>
				</thead>
				<tbody>
<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['memberr'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['memberr']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['memberr']['iteration']++;
?>
<tr class="<?php echo smarty_function_cycle(array('values' => "odd,mod",'name' => 'memberr'), $this);?>
">
	<td><input name="shop_cd[]"   type="text"   class="dtext" value="<?php echo $this->_tpl_vars['v']['shop_cd']; ?>
" readonly/></td>
	<td><input name="shop_name[]"  type="text"   class="dtext" value="<?php echo $this->_tpl_vars['v']['shop_name']; ?>
" readonly/></td>
	<?php $_from = $this->_tpl_vars['pattern']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['pattername'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['pattername']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kh'] => $this->_tpl_vars['vh']):
        $this->_foreach['pattername']['iteration']++;
?>
		<td> <input id="c<?php echo $this->_tpl_vars['vh']['pattern_cd']; ?>
_<?php echo $this->_tpl_vars['k']; ?>
" name="c<?php echo $this->_tpl_vars['vh']['pattern_cd']; ?>
[]" type="checkbox" class="cp" value="<?php echo $this->_tpl_vars['vh']['pattern_cd']; ?>
" <?php if ($this->_tpl_vars['v'][$this->_tpl_vars['vh']['col']]): ?>checked<?php endif; ?>/> <input id="p<?php echo $this->_tpl_vars['vh']['pattern_cd']; ?>
_<?php echo $this->_tpl_vars['k']; ?>
" name="p<?php echo $this->_tpl_vars['vh']['pattern_cd']; ?>
[]"  type="text"    class="tdtext" style="width:68%"   value="<?php echo $this->_tpl_vars['v'][$this->_tpl_vars['vh']['col']]; ?>
" /></td>
	<?php endforeach; endif; unset($_from); ?>
</tr>
<?php endforeach; endif; unset($_from); ?>
				</tbody>
			</table>
  </div>
				<p class="button">
					<button type="button" id="btn-save"  ><span>この内容で保存</span></button>
				</p>
<?php else: ?>
<p class="message">条件にマッチする情報は見つかりませんでした。</p>
<?php endif; ?>
<?php else: ?>
	<p class="message">ここに検索結果が表示されます。</p>
<?php endif; ?>

</form>

<div id="dialog" >
</div>
		</div></div>
		<?php echo $this->_tpl_vars['footer']; ?>

	</body>
</html>